//
//  SwiftBrick.swift
//  SwiftBrick
//
//  Created by iOS on 2020/11/30.
//  Copyright © 2020 狄烨 . All rights reserved.
//

import Foundation
import UIKit
// MARK: ===================================VC基类:协议=========================================
public struct SwiftBrick{
    ///如果使用导航栏的功能可以全局设置下
    ///统一设置返回按钮图片(默认)
    public static var navBarNorBackImage: UIImage?
    ///统一设置返回按钮图片(按下)
    public static var navBarHigBackImage: UIImage?
    ///导航栏左按钮修正距离,默认按钮距离边缘为20:左移为-,右移为+
    public static var navBarLeftFixSpace: CGFloat = 0
    ///导航栏右按钮修正距离,默认按钮距离边缘为20:左移为+,右移为-
    public static var navBarRightFixSpace: CGFloat = 0
    
    ///当导航栏从隐藏的页面滑动到有导航栏的页面或者从有到无的页面滑动,使过度更加平滑,vc需要隐藏导航栏设置下prefersNavigationBarHidden = true
    public static func navBarSmooth() {
        SwizzleNavBar.swizzle
    }
}

public protocol JHBaseVC{

    func hideDefaultBackBarButton()
    
    func hideRightBarButton()
    
    func fixSpaceLeftBarButton(btnItem: UIBarButtonItem)
    
    func fixSpaceRightBarButton(btnItem: UIBarButtonItem, fixSpace: CGFloat)
    
    func addLeftBarButton(normalImage: UIImage?,
                          highLightImage: UIImage?,
                          touchUp: ButtonClosure?)
    
    func addLeftBarButton(text: String,
                          font: UIFont?,
                          normalColor: UIColor?,
                          highlightColor: UIColor?,
                          touchUp: ButtonClosure?)
    
    func addRightBarButton(normalImage: UIImage?,
                           highLightImage: UIImage?,
                           selectedImage: UIImage?,
                           disableImage: UIImage?,
                           fixSpace: CGFloat,
                           touchUp: ButtonClosure?)
    
    func addRightBarButton(text: String,
                           font: UIFont?,
                           normalColor: UIColor?,
                           highlightColor: UIColor?,
                           selectedColor: UIColor?,
                           disableColor: UIColor?,
                           fixSpace: CGFloat,
                           touchUp: ButtonClosure?)
    
    func configLeftBarButton(text: String?,
                             font: UIFont?,
                             normalColor: UIColor?,
                             highlightColor: UIColor?,
                             normalImage: UIImage?,
                             highLightImage: UIImage?)
    
    func configRightBarButton(text: String?,
                              font: UIFont?,
                              normalColor: UIColor?,
                              highlightColor: UIColor?,
                              selectedColor: UIColor?,
                              disableColor: UIColor?,
                              normalImage: UIImage?,
                              highLightImage: UIImage?,
                              selectedImage: UIImage?,
                              disableImage: UIImage?)
    
}


